home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AmigActive 2
/
AACD 2.iso
/
AACD
/
WebSites
/
MailingLists
/
AMOSLIST.0799
/
000173_nobody_Wed Jul 28 19:47:47 1999.msg
< prev
next >
Wrap
Internet Message Format
|
1999-08-02
|
3KB
Received: from onelist.com (pop.onelist.com [209.207.135.253])
by osf1.gmu.edu (8.8.8/8.8.8) with SMTP id TAA11378
for <mcox4@osf1.gmu.edu>; Wed, 28 Jul 1999 19:47:47 -0400 (EDT)
Received: (qmail 13782 invoked by alias); 28 Jul 1999 23:47:10 -0000
Received: (qmail 13747 invoked from network); 28 Jul 1999 23:47:09 -0000
Received: from unknown (HELO web901.mail.yahoo.com) (128.11.23.76) by pop.onelist.com with SMTP; 28 Jul 1999 23:47:09 -0000
Message-ID: <19990728234412.2824.rocketmail@web901.mail.yahoo.com>
Received: from [62.188.142.92] by web901.mail.yahoo.com; Thu, 29 Jul 1999 00:44:12 BST
Date: Thu, 29 Jul 1999 00:44:12 +0100 (BST)
From: =?iso-8859-1?q?Claude=20Heiland-Allen?= <cheilandallen@yahoo.co.uk>
To: amos-list@onelist.com
Mailing-List: list amos-list@onelist.com; contact amos-list-owner@onelist.com
Delivered-To: mailing list amos-list@onelist.com
Precedence: bulk
List-Unsubscribe: <mailto:amos-list-unsubscribe@ONElist.com>
Reply-to: amos-list@onelist.com
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Subject: [amos-list] amiga mouse driver
Status: O
X-Status:
From: =?iso-8859-1?q?Claude=20Heiland-Allen?= <cheilandallen@yahoo.co.uk>
Hi
Here is that code I promised to read the second mouse
port. I
haven't tested it myself, but it looks feasible, and
was from
a mag (I think Amiga Shopper). Not exactly OS legal,
but that
doesn't matter anymore.
Someone asked quite a while ago though...
Claude
' magic registers
_JOY0DAT = $DFF00A ' standard mouse port
_JOY1DAT = $DFF00C ' second mouse port
' initialise
mousex = 0
mousey = 0
counterx = Peek(_JOY1DAT+1)
countery = Peek(_JOY1DAT )
DO ' main loop
' should probably waitvbl, but not strictly
necessary
oldcounterx = counterx
oldcountery = countery
counterx = Peek(_JOY1DAT+1)
countery = Peek(_JOY1DAT )
deltax = counterx - oldcounterx
deltay = countery - oldcountery
' counters wrap, correct deltas
IF deltax < -128 THEN deltax = deltax + 256
IF deltax > 127 THEN deltax = deltax - 256
IF deltay < -128 THEN deltay = deltay + 256
IF deltay > 127 THEN deltay = deltay - 256
' do fancy effects (eg acceleration, gravity) here
mousex = mousex + deltax
mousey = mousey + deltay
' keep within screen bounds here
LOOP
_____________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
--------------------------- ONElist Sponsor ----------------------------
How do you enter ONElist�s WEEKLY DRAWING for $100?
By joining the FRIENDS & FAMILY program. For details, go to
http://www.onelist.com/info/onereachsplash3.html
------------------------------------------------------------------------
Official AMOS WWW: http://members.xoom.com/AmosFactory/front.html